package com.syh.jn.scm.infrastructure.repository.model.history;


import com.syh.core.ddd.infrastructure.repository.model.SuperModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by soci.song on 2019/1/18.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Builder
@Entity
@Table(name = "T_SALE_HISTORY")
public class SaleHistoryModel extends SuperModel {

    @Column(name = "BUSINESS_ENTITY_ID", columnDefinition = "bigint COMMENT '数据归属公司id'")
    private Long businessEntityId;

    @Column(name = "ACCOUNT_COMPANY_ID", columnDefinition = "bigint COMMENT '操作人公司ID'")
    private Long accountCompanyId;

    @Column(name = "ACCOUNT_COMPANY_NAME", columnDefinition = "varchar(60) COMMENT '操作人公司'")
    private String accountCompanyName;

    @Column(name = "ACCOUNT_ID", columnDefinition = "bigint COMMENT '操作人ID'")
    private Long accountId;

    @Column(name = "ACCOUNT", columnDefinition = "varchar(60) COMMENT '操作人账号'")
    private String account;

    @Column(name = "ACCOUNT_NAME", columnDefinition = "varchar(60) COMMENT '操作人'")
    private String accountName;

    @Column(name = "ACCOUNT_TYPE", columnDefinition = "varchar(20) COMMENT '操作人所属终端类型'")
    private String accountType;

    @Column(name = "IP", columnDefinition = "varchar(60) COMMENT '登录地址'")
    private String ip;

    @Column(name = "ORIGINAL_ID", columnDefinition = "bigint COMMENT '来源单据ID'")
    private Long originalId;

    @Column(name = "ORIGINAL_CODE", columnDefinition = "varchar(60) COMMENT '来源单据CODE'")
    private String originalCode;

    @Column(name = "HISTORY", columnDefinition = "text COMMENT '历史记录'")
    private String history;

    @Column(name = "CREATE_TIME_STAMP", columnDefinition = "bigint COMMENT '创建日期'")
    private Long createTimeStamp;

}
